<?php

declare(strict_types=1);

namespace App\CustHub\Constants;

use App\Common\Constants\AbstractBaseConstants;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class OpSchemeTypeConstants extends AbstractBaseConstants
{
    /**
     * @Message("新客户运营")
     */
    const NEW_CUSTOMER = 0;

    /**
     * @Message("关键词标签")
     */
    const KEYWORD_TAG = 1;

    /**
     * @Message("入群欢迎语")
     */
    const ROOM_WELCOME = 2;

    /**
     * @Message("关键词拉群")
     */
    const ROOM_KEYWORD = 3;

    /**
     * @Message("直接踢人")
     */
    const ROOM_KICK_USER = 4;

    /**
     * @Message("接受新客户")
     */
    const AUTO_ACCEPT = 5;

    public static function getSendConfigType($type): int
    {
        return match ($type){
            self::NEW_CUSTOMER => SendConfigConstants::NEW_CUSTOMER,
            self::ROOM_WELCOME => SendConfigConstants::ROOM_WELCOME,
            self::ROOM_KEYWORD => SendConfigConstants::ROOM_KEYWORD,
            default => 0,
        };
    }
}